import { createWebHashHistory, createRouter } from "vue-router";
import Layout from "../views/layout/index.vue";
import NoneFound from "../views/404/index.vue";
import asyncRouters from "./moudles/index"

export const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    children: asyncRouters
  },
  {
    path: "/:pathMatch(.*)*",
    component: NoneFound,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
